﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MakeRequisition.aspx.cs" Inherits="PresentationLayer.MakeRequisition" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link type="text/css" rel="stylesheet" href="/Content/css/bootstrap.css" /> 
    <style>
         .Hide { display:none; }

    </style>
    <script>
        $("[id*=btnSubmit]").live("click", function () {
        $("#modal_dialog").dialog({
            title: "jQuery Modal Dialog Popup",
            buttons: {
                Close: function () {
                    $(this).dialog('close');
                }
            },
            modal: true
        });
        return false;
    });
    </script>
</head>
<body>
    <form id="form1" runat="server">
       <asp:ValidationSummary ID="ValidationSummary1"
        HeaderText="You must enter a value in the following fields:"
        DisplayMode="BulletList"
        EnableClientScript="true"
        runat="server"/>
    <div>
                 <div class="form-group">
                    <label class="control-label col-sm-4" for="ddlCategory">Category:</label> 
                    <div class="col-sm-7">
                        <asp:DropDownList ID="ddlCategory" CssClass="form-control" AutoPostBack="true" runat="server" OnSelectedIndexChanged="ddlCategory_SelectedIndexChanged" ></asp:DropDownList>
                     <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
                          ErrorMessage="Please Choose Category" Text="*" ControlToValidate="ddlCategory" InitialValue="Choose Category..."></asp:RequiredFieldValidator>
                    </div>
                </div>
        
                 <div class="form-group">
                    <label class="control-label col-sm-4" for="ddlItem">Item Name:</label> 
                    <div class="col-sm-7">
                        <asp:DropDownList ID="ddlStationery" CssClass="form-control" runat="server"></asp:DropDownList>
                    </div>
                    
                </div>
                <div class="form-group">
                    <label class="control-label col-sm-4" for="ddlItem">Quantity:</label> 
                    <div class="col-sm-7">
                        <asp:TextBox ID="txtQty" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtQty" Text="*" ErrorMessage="Please Enter number"></asp:RequiredFieldValidator>
                        <asp:CompareValidator ID="CompareValidator1" Text="*" runat="server" Operator="DataTypeCheck" Type="Integer" 
                        ControlToValidate="txtQty" ErrorMessage="Value must be a number" />
                    </div>
                      

                </div>

            <asp:Button ID="btnAdd" CssClass="btn-primary" runat="server" Text="Add Item" OnClick="btnAdd_Click" />
            
            <asp:GridView ID="gvTempItemList" runat="server" AutoGenerateColumns="False" EmptyDataText="No Records Found" OnRowDeleting="gvTempItemList_RowDeleting" >
                <Columns>
                     <asp:BoundField DataField="ItemCode" HeaderText="Item Code" HeaderStyle-CssClass="Hide" ItemStyle-CssClass="hide">

                     </asp:BoundField>
                    
                     <asp:BoundField DataField="ItemName" HeaderText="Item Name">
                         <ItemStyle BorderStyle="Solid" />
                     </asp:BoundField>
                    <asp:BoundField DataField="Category" HeaderText="Category">
                         <ItemStyle BorderStyle="Solid" />
                     </asp:BoundField>
                     <asp:BoundField DataField="Qty" HeaderText="Quantity">
                         <ItemStyle BorderStyle="Solid" />
                     </asp:BoundField>
                    <asp:CommandField ShowDeleteButton="True" ButtonType="Button" DeleteText="Remove" />
                   
                    
                 </Columns>

            </asp:GridView>

                 <br />

            <asp:Button ID="btnSubmit" CausesValidation="false" CssClass="btn-primary" runat="server" Text="Submit" OnClick="btnSubmit_Click" />
            
    </div>
    </form>
    <script type="text/javascript"  src='<%# ResolveUrl ("~/Scripts/jquery-1.7.1.min.js") %>'></script>

    <script src="/Scripts/js/bootstrap.min.js"></script> 
</body>
</html>
